package com.rboat.exam.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.rboat.exam.mapper.ExamTestPaperQuestionsMapper;
import com.rboat.exam.domain.ExamTestPaperQuestions;
import com.rboat.exam.service.IExamTestPaperQuestionsService;
import com.rboat.common.core.text.Convert;

/**
 * 试卷章节试题Service业务层处理
 * 
 * @author rboat
 * @date 2019-09-02
 */
@Service
public class ExamTestPaperQuestionsServiceImpl implements IExamTestPaperQuestionsService 
{
    @Autowired
    private ExamTestPaperQuestionsMapper examTestPaperQuestionsMapper;

    /**
     * 查询试卷章节试题
     * 
     * @param id 试卷章节试题ID
     * @return 试卷章节试题
     */
    @Override
    public ExamTestPaperQuestions selectExamTestPaperQuestionsById(String id)
    {
        return examTestPaperQuestionsMapper.selectExamTestPaperQuestionsById(id);
    }

    /**
     * 查询试卷章节试题列表
     * 
     * @param examTestPaperQuestions 试卷章节试题
     * @return 试卷章节试题
     */
    @Override
    public List<ExamTestPaperQuestions> selectExamTestPaperQuestionsList(ExamTestPaperQuestions examTestPaperQuestions)
    {
        return examTestPaperQuestionsMapper.selectExamTestPaperQuestionsList(examTestPaperQuestions);
    }

    /**
     * 新增试卷章节试题
     * 
     * @param examTestPaperQuestions 试卷章节试题
     * @return 结果
     */
    @Override
    public int insertExamTestPaperQuestions(ExamTestPaperQuestions examTestPaperQuestions)
    {
        return examTestPaperQuestionsMapper.insertExamTestPaperQuestions(examTestPaperQuestions);
    }

    /**
     * 修改试卷章节试题
     * 
     * @param examTestPaperQuestions 试卷章节试题
     * @return 结果
     */
    @Override
    public int updateExamTestPaperQuestions(ExamTestPaperQuestions examTestPaperQuestions)
    {
        return examTestPaperQuestionsMapper.updateExamTestPaperQuestions(examTestPaperQuestions);
    }

    /**
     * 删除试卷章节试题对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteExamTestPaperQuestionsByIds(String ids)
    {
        return examTestPaperQuestionsMapper.deleteExamTestPaperQuestionsByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除试卷章节试题信息
     * 
     * @param id 试卷章节试题ID
     * @return 结果
     */
    @Override
    public int deleteExamTestPaperQuestionsById(String id)
    {
        return examTestPaperQuestionsMapper.deleteExamTestPaperQuestionsById(id);
    }
}
